package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 系统通告表 实体类
 * 表名：sys_announcement
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_announcement")
public class SysAnnouncement implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 标题
     */
    @Column(name = "titile", length = 255)
    private String titile;
    
    /**
     * 内容
     */
    @Column(name = "msg_content", length = 65535)
    private String msgContent;
    
    /**
     * 开始时间
     */
    @Column(name = "start_time")
    private java.time.LocalDateTime startTime;
    
    /**
     * 结束时间
     */
    @Column(name = "end_time")
    private java.time.LocalDateTime endTime;
    
    /**
     * 发布人
     */
    @Column(name = "sender", length = 100)
    private String sender;
    
    /**
     * 优先级（L低，M中，H高）
     */
    @Column(name = "priority", length = 255)
    private String priority;
    
    /**
     * 消息类型1:通知公告2:系统消息
     * 默认值: 2
     */
    @Column(name = "msg_category", nullable = false, length = 10)
    private String msgCategory;
    
    /**
     * 通告对象类型（USER:指定用户，ALL:全体用户）
     */
    @Column(name = "msg_type", length = 10)
    private String msgType;
    
    /**
     * 发布状态（0未发布，1已发布，2已撤销）
     */
    @Column(name = "send_status", length = 10)
    private String sendStatus;
    
    /**
     * 发布时间
     */
    @Column(name = "send_time")
    private java.time.LocalDateTime sendTime;
    
    /**
     * 撤销时间
     */
    @Column(name = "cancel_time")
    private java.time.LocalDateTime cancelTime;
    
    /**
     * 删除状态（0，正常，1已删除）
     */
    @Column(name = "del_flag", length = 1)
    private String delFlag;
    
    /**
     * 业务类型(email:邮件 bpm:流程)
     */
    @Column(name = "bus_type", length = 20)
    private String busType;
    
    /**
     * 业务id
     */
    @Column(name = "bus_id", length = 50)
    private String busId;
    
    /**
     * 打开方式(组件：component 路由：url)
     */
    @Column(name = "open_type", length = 20)
    private String openType;
    
    /**
     * 组件/路由 地址
     */
    @Column(name = "open_page", length = 255)
    private String openPage;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    /**
     * 指定用户
     */
    @Column(name = "user_ids", length = 65535)
    private String userIds;
    
    /**
     * 摘要
     */
    @Column(name = "msg_abstract", length = 65535)
    private String msgAbstract;
    
    @Override
    public String toString() {
        return "SysAnnouncement{" +
            "id=" + id +
            ", titile=" + titile +
            ", msgContent=" + msgContent +
            ", startTime=" + startTime +
            ", endTime=" + endTime +
            ", sender=" + sender +
            ", priority=" + priority +
            ", msgCategory=" + msgCategory +
            ", msgType=" + msgType +
            ", sendStatus=" + sendStatus +
            ", sendTime=" + sendTime +
            ", cancelTime=" + cancelTime +
            ", delFlag=" + delFlag +
            ", busType=" + busType +
            ", busId=" + busId +
            ", openType=" + openType +
            ", openPage=" + openPage +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", userIds=" + userIds +
            ", msgAbstract=" + msgAbstract +
        '}';
    }
} 